* This file is a re-replication of Gibler, Miller, and Little replication of Weeks (2008). 
* This is the second of two Weeks replication files.
* It focuses on replicating Weeks' results with different dyads and versions of the recip variable, based on different versions of the MID data.

clear
capture log close
cd "C:\Users\rum842\Dropbox\3.4 MID McManus\ISQ Response\Final Submission\Replication Files" //Insert your own directory here.
log using "Weeks Analysis Replication.log", replace
set more off

* The following data modifications are directly cut and pasted from Weeks' own replication file, available on her website.

use "WeeksIO.dta", clear //This is from Weeks' website.

gen float recip=0
replace recip=1 if cwhost2>1
*cwhost2>1 picks up all instances in which the target responded with a militarized action

gen float capshare1=cap_1/(cap_1 + cap_2)
gen float logcaprat=log(cap_1/cap_2)

gen float ally=.
replace ally=1 if alliance==1
replace ally=1 if alliance==2
replace ally=1 if alliance==3
replace ally=0 if alliance==4

gen float majmaj=0
replace majmaj=1 if majpow1==1 &majpow2==1
gen float majmin=0
replace majmin=1 if majpow1==1 & majpow2==0
gen float minmaj=0
replace minmaj=1 if majpow1==0 & majpow2==1

gen float revter=0
replace revter=1 if cwrevt11==1
gen float revpol=0
replace revpol=1 if cwrevt11==2
gen float revgov=0
replace revgov=1 if cwrevt11== 3
gen float revoth=0
replace revoth=1 if cwrevt11==4

replace dtrade=. if dtrade==-999
replace s1=. if s1==-9
replace s2=. if s2==-9
replace w1=. if w1==-9
replace w2=. if w2==-9

*fix contig variable
rename contig contig1
gen contig=0
replace contig=1 if contig1<6
*no missing values, so can use <

*mark bilateral dyads
gen bilateral=0
replace bilateral=1 if cwnumst1==1 & cwnumst2==1

label define regimetype1label 1 "democracy" 2 "personalist" 3 "military" 4 "single" 5 "hybrid" 6 "dynastic monarchy" 7 "non-dynastic monarchy" 8 "interregna" 9 "no info" 10 "other" 11 "interregnadem"
label values regimetype1 regimetype1label

*variable marking whether initiator has an actual "regime"
gen int chaosEUG=0
replace chaosEUG=1 if dem1<-11

*generate Eugene variables just for comparison

gen demdum1EUG=.
replace demdum1EUG=0 if dem1<7
replace demdum1EUG=1 if dem1>6
replace demdum1EUG=. if dem1==.

gen demdum2EUG= .
replace demdum2EUG=0 if dem2<7
replace demdum2EUG=1 if dem2>6
replace demdum2EUG=. if dem2==.

gen demdumbothEUG = demdum1EUG*demdum2EUG
*browse year ccodecow abbrev1 ccodecow2 abbrev2 cwkeynum recip cwinit cwhost1 cwhost2 dem1 polityIV polity2_1 demdum1 personal1 purepers1 hybridpers1 single1 military1 hybrid1 monarch1 other1 interregna chaosPOL threeyr w1 dem2 polityIV2 demdum2 majmaj minmaj majmin  cap_1  cap_2 capshare1 contig ally s_wt_glo s_ld_1 s_ld_2 revter revgov revpol revoth if year>1945

gen tankerwar=0
replace tankerwar=1 if ccodecow==645 & (year>1983 & year<1988)
replace tankerwar=1 if ccodecow==630 & (year>1983 & year<1989)

gen seizure=0
replace seizure=1 if cwhiact1==15


	*1586 cases total 1946-1999
	*But drop India 1947 and Zimbabwe 1965, 1969 since no regimetype info
drop if year==1947 & abbrev1=="IND"
drop if year==1965 & abbrev1=="ZIM"
drop if year==1969 & abbrev1=="ZIM"

* This is the end of Weeks' exact code.


********************************************** ADD NEW VARIABLES **********************************************************

* Now re-label Weeks' recip variable and merge in the alternatives that we created in the previous do file.

ren recip recip_weeks

* Relabel other variables for merge to work
ren cwinitnm dispnum
ren ccodecow ccodea
ren ccodecow2 ccodeb

merge 1:1 ccodea ccodeb dispnum using "Weeks Dyadic MIDs 4.3.dta", keepusing(recip) nogen //Unmatched observations are ok. They represent MIDs that have been ommitted from the data.
ren recip recip_mid4

merge 1:1 ccodea ccodeb dispnum using "Weeks Dyadic MIDs GML ISQ.dta", keepusing(recip) nogen //Unmatched observations are ok. They represent MIDs that have been ommitted from the data.
ren recip recip_gml1

merge 1:1 ccodea ccodeb dispnum using "Weeks Dyadic MIDs GML 2.1.dta", keepusing(recip) nogen //Unmatched observations are ok. They represent MIDs that have been ommitted from the data.
ren recip recip_gml2


******************************************* ANALYSIS **************************************************************************

* We begin be replicating Weeks's results, adding some matrix notation that will allow us to produce figures.

*Weeks - M1
logit recip_weeks demdum1 majmaj minmaj majmin capshare1 contig ally s_wt_glo  ///
			s_ld_1 s_ld_2 revter revgov revpol revoth if year>1945 & ///
			year<2000, robust cluster(cwkeynum) 
matrix beta = e(b)
matrix cov = e(V)
matrix m1_weeks = J(14,2,.)
matrix coln m1_weeks = coef se
matrix rown m1_weeks = demdum1 majmaj minmaj majmin capshare1 contig ally ///
						s_wt_glo  s_ld_1 s_ld_2 revter revgov revpol revoth
foreach i of num 1/14 {
	matrix m1_weeks[`i',1] = beta[1,`i']
	matrix m1_weeks[`i',2] = sqrt(cov[`i',`i'])
}

*Weeks - M2
logit recip_weeks interregnadem personal1 single1 military1 hybrid1 dynastic1 nondynastic1 interregna other1 majmaj minmaj majmin capshare1 contig ally s_wt_glo s_ld_1 s_ld_2 revter revgov revpol revoth if year>1945 & year<2000, robust cluster(cwkeynum)
matrix beta = e(b)
matrix cov = e(V)
matrix m2_weeks = J(21,2,.)
matrix coln m2_weeks = coef se
matrix rown m2_weeks = interregnadem personal1 single1 military1 hybrid1 ///
			dynastic1 nondynastic1 interregna majmaj minmaj majmin ///
			capshare1 contig ally s_wt_glo s_ld_1 s_ld_2 revter revgov ///
			revpol revoth
foreach i of num 1/8 {
	matrix m2_weeks[`i',1] = beta[1,`i']
	matrix m2_weeks[`i',2] = sqrt(cov[`i',`i'])
}
foreach i of num 10/22 {
	matrix m2_weeks[`i'-1,1] = beta[1,`i']
	matrix m2_weeks[`i'-1,2] = sqrt(cov[`i',`i'])
}		

*Weeks - M3
logit recip_weeks interregnadem personal1 single1 military1 hybrid1 dynastic1 nondynastic1 interregna other1 majmaj minmaj majmin capshare1 contig ally s_wt_glo s_ld_1 s_ld_2 revter revgov revpol revoth if year>1945 & year<2000 & bilateral==1, robust cluster(cwkeynum)
matrix beta = e(b)
matrix cov = e(V)
matrix m3_weeks = J(21,2,.)
matrix coln m3_weeks = coef se
matrix rown m3_weeks = interregnadem personal1 single1 military1 hybrid1 ///
				dynastic1 nondynastic1 interregna majmaj minmaj majmin ///
				capshare1 contig ally s_wt_glo s_ld_1 s_ld_2 revter revgov ///
				revpol revoth
foreach i of num 1/8 {
	matrix m3_weeks[`i',1] = beta[1,`i']
	matrix m3_weeks[`i',2] = sqrt(cov[`i',`i'])
}
foreach i of num 10/22 {
	matrix m3_weeks[`i'-1,1] = beta[1,`i']
	matrix m3_weeks[`i'-1,2] = sqrt(cov[`i',`i'])
}	

*Weeks - M4
logit recip_weeks polity2_1 single1 military1 hybrid1 dynastic1 nondynastic1 interregna other1 majmaj minmaj majmin capshare1 contig ally s_wt_glo  s_ld_1 s_ld_2 revter revgov revpol revoth if year>1945 & year<2000 & demdum1==0, robust cluster(cwkeynum)
matrix beta = e(b)
matrix cov = e(V)
matrix m4_weeks = J(20,2,.)
matrix coln m4_weeks = coef se
matrix rown m4_weeks = polity2_1 single1 military1 hybrid1 dynastic1 ///
		nondynastic1 interregna majmaj minmaj majmin capshare1 ///
		contig ally s_wt_glo  s_ld_1 s_ld_2 revter revgov revpol revoth
		*number 8
foreach i of num 1/7 {
	matrix m4_weeks[`i',1] = beta[1,`i']
	matrix m4_weeks[`i',2] = sqrt(cov[`i',`i'])
}
foreach i of num 9/21 {
	matrix m4_weeks[`i'-1,1] = beta[1,`i']
	matrix m4_weeks[`i'-1,2] = sqrt(cov[`i',`i'])
}	


* Now we run the regressions again using the GML data. 
* We use Version 2.1 of the GML data here because it allows us to make incident-level corrections as Weeks did and because it is the most up-to-date GML data.
* Results using the ISQ article version of the GML data can be seen by sustituting recip_gml1 for recip_gml2.

* In their ISQ article analysis, GML run two sets of models. 
* The first set merely changes the Weeks' recip variable, while the second set also drops observations not in the GML data.
* Here we follow the approach of the second set, both modifying the recip variable and dropping observations based on the GML data.
* We accomplish this simply by not filling in the recip_gml variable for the unmatched observations.
* This approach is most likely to show that using the GML data makes a difference.
 
*GML-M1
logit recip_gml2 demdum1 majmaj minmaj majmin capshare1 contig ally s_wt_glo  s_ld_1 s_ld_2 revter revgov revpol revoth if year>1945 & year<2000, robust cluster(cwkeynum) 
matrix beta = e(b)
matrix cov = e(V)
matrix m1_gml = J(14,2,.)
matrix coln m1_gml = coef se
matrix rown m1_gml = demdum1 majmaj minmaj majmin capshare1 contig ally ///
						s_wt_glo  s_ld_1 s_ld_2 revter revgov revpol revoth
foreach i of num 1/14 {
	matrix m1_gml[`i',1] = beta[1,`i']
	matrix m1_gml[`i',2] = sqrt(cov[`i',`i'])
}

*GML-M2
logit recip_gml2 interregnadem personal1 single1 military1 hybrid1 dynastic1 nondynastic1 interregna other1 majmaj minmaj majmin capshare1 contig ally s_wt_glo s_ld_1 s_ld_2 revter revgov revpol revoth if year>1945 & year<2000, robust cluster(cwkeynum)
matrix beta = e(b)
matrix cov = e(V)
matrix m2_gml = J(21,2,.)
matrix coln m2_gml = coef se
matrix rown m2_gml = interregnadem personal1 single1 military1 hybrid1 ///
			dynastic1 nondynastic1 interregna majmaj minmaj majmin ///
			capshare1 contig ally s_wt_glo s_ld_1 s_ld_2 revter revgov ///
			revpol revoth
foreach i of num 1/8 {
	matrix m2_gml[`i',1] = beta[1,`i']
	matrix m2_gml[`i',2] = sqrt(cov[`i',`i'])
}
foreach i of num 10/22 {
	matrix m2_gml[`i'-1,1] = beta[1,`i']
	matrix m2_gml[`i'-1,2] = sqrt(cov[`i',`i'])
}		


*GML-M3
logit recip_gml2 interregnadem personal1 single1 military1 hybrid1 dynastic1 nondynastic1 interregna other1 majmaj minmaj majmin capshare1 contig ally s_wt_glo s_ld_1 s_ld_2 revter revgov revpol revoth if year>1945 & year<2000 & bilateral==1, robust cluster(cwkeynum)
matrix beta = e(b)
matrix cov = e(V)
matrix m3_gml = J(21,2,.)
matrix coln m3_gml = coef se
matrix rown m3_gml = interregnadem personal1 single1 military1 hybrid1 ///
			dynastic1 nondynastic1 interregna majmaj minmaj majmin ///
			capshare1 contig ally s_wt_glo s_ld_1 s_ld_2 revter revgov ///
			revpol revoth
foreach i of num 1/8 {
	matrix m3_gml[`i',1] = beta[1,`i']
	matrix m3_gml[`i',2] = sqrt(cov[`i',`i'])
}
foreach i of num 10/22 {
	matrix m3_gml[`i'-1,1] = beta[1,`i']
	matrix m3_gml[`i'-1,2] = sqrt(cov[`i',`i'])
}		

*GML-M4
logit recip_gml2 polity2_1 single1 military1 hybrid1 dynastic1 nondynastic1 interregna other1 majmaj minmaj majmin capshare1 contig ally s_wt_glo  s_ld_1 s_ld_2 revter revgov revpol revoth if year>1945 & year<2000 & demdum1==0, robust cluster(cwkeynum)
matrix beta = e(b)
matrix cov = e(V)
matrix m4_gml = J(20,2,.)
matrix coln m4_gml = coef se
matrix rown m4_gml = polity2_1 single1 military1 hybrid1 dynastic1 ///
		nondynastic1 interregna majmaj minmaj majmin capshare1 ///
		contig ally s_wt_glo  s_ld_1 s_ld_2 revter revgov revpol revoth
		*number 8
foreach i of num 1/7 {
	matrix m4_gml[`i',1] = beta[1,`i']
	matrix m4_gml[`i',2] = sqrt(cov[`i',`i'])
}
foreach i of num 9/21 {
	matrix m4_gml[`i'-1,1] = beta[1,`i']
	matrix m4_gml[`i'-1,2] = sqrt(cov[`i',`i'])
}	

* Now we run the regressions once more using the MID 4.3 data

*MID 4-M1
logit recip_mid4 demdum1 majmaj minmaj majmin capshare1 contig ally s_wt_glo  s_ld_1 s_ld_2 revter revgov revpol revoth if year>1945 & year<2000, robust cluster(cwkeynum) 
matrix beta = e(b)
matrix cov = e(V)
matrix m1_mid4 = J(14,2,.)
matrix coln m1_mid4 = coef se
matrix rown m1_mid4 = demdum1 majmaj minmaj majmin capshare1 contig ally ///
						s_wt_glo  s_ld_1 s_ld_2 revter revgov revpol revoth
foreach i of num 1/14 {
	matrix m1_mid4[`i',1] = beta[1,`i']
	matrix m1_mid4[`i',2] = sqrt(cov[`i',`i'])
}

*MID 4-M2
logit recip_mid4 interregnadem personal1 single1 military1 hybrid1 dynastic1 nondynastic1 interregna other1 majmaj minmaj majmin capshare1 contig ally s_wt_glo s_ld_1 s_ld_2 revter revgov revpol revoth if year>1945 & year<2000, robust cluster(cwkeynum)
matrix beta = e(b)
matrix cov = e(V)
matrix m2_mid4 = J(21,2,.)
matrix coln m2_mid4 = coef se
matrix rown m2_mid4 = interregnadem personal1 single1 military1 hybrid1 ///
			dynastic1 nondynastic1 interregna majmaj minmaj majmin ///
			capshare1 contig ally s_wt_glo s_ld_1 s_ld_2 revter revgov ///
			revpol revoth
foreach i of num 1/8 {
	matrix m2_mid4[`i',1] = beta[1,`i']
	matrix m2_mid4[`i',2] = sqrt(cov[`i',`i'])
}
foreach i of num 10/22 {
	matrix m2_mid4[`i'-1,1] = beta[1,`i']
	matrix m2_mid4[`i'-1,2] = sqrt(cov[`i',`i'])
}		

*MID 4-M3
logit recip_mid4 interregnadem personal1 single1 military1 hybrid1 dynastic1 nondynastic1 interregna other1 majmaj minmaj majmin capshare1 contig ally s_wt_glo s_ld_1 s_ld_2 revter revgov revpol revoth if year>1945 & year<2000 & bilateral==1, robust cluster(cwkeynum)
matrix beta = e(b)
matrix cov = e(V)
matrix m3_mid4 = J(21,2,.)
matrix coln m3_mid4 = coef se
matrix rown m3_mid4 = interregnadem personal1 single1 military1 hybrid1 ///
			dynastic1 nondynastic1 interregna majmaj minmaj majmin ///
			capshare1 contig ally s_wt_glo s_ld_1 s_ld_2 revter revgov ///
			revpol revoth
foreach i of num 1/8 {
	matrix m3_mid4[`i',1] = beta[1,`i']
	matrix m3_mid4[`i',2] = sqrt(cov[`i',`i'])
}
foreach i of num 10/22 {
	matrix m3_mid4[`i'-1,1] = beta[1,`i']
	matrix m3_mid4[`i'-1,2] = sqrt(cov[`i',`i'])
}	

*MID 4-M4
logit recip_mid4 polity2_1 single1 military1 hybrid1 dynastic1 nondynastic1 interregna other1 majmaj minmaj majmin capshare1 contig ally s_wt_glo  s_ld_1 s_ld_2 revter revgov revpol revoth if year>1945 & year<2000 & demdum1==0, robust cluster(cwkeynum)
matrix beta = e(b)
matrix cov = e(V)
matrix m4_mid4 = J(20,2,.)
matrix coln m4_mid4 = coef se
matrix rown m4_mid4 = polity2_1 single1 military1 hybrid1 dynastic1 ///
		nondynastic1 interregna majmaj minmaj majmin capshare1 ///
		contig ally s_wt_glo  s_ld_1 s_ld_2 revter revgov revpol revoth
		*number 8
foreach i of num 1/7 {
	matrix m4_mid4[`i',1] = beta[1,`i']
	matrix m4_mid4[`i',2] = sqrt(cov[`i',`i'])
}
foreach i of num 9/21 {
	matrix m4_mid4[`i'-1,1] = beta[1,`i']
	matrix m4_mid4[`i'-1,2] = sqrt(cov[`i',`i'])
}	



*labeling vars 
label var demdum1 "Democratic (>2 years)"
label var majmaj "Major-Major"
label var minmaj "Minor-Major"
label var majmin "Major-Minor"
label var capshare1 "Initiator Capabilities Share"
label var contig "Contiguity"
label var ally "Ally"
label var s_wt_glo "Alliance Portfolio Similarity"
label var s_ld_1 "Status Quo Evaluation Initiator"
label var s_ld_2 "Status Quo Evaluation Target"
label var revter "Territorial MID"
label var revgov "Governmental MID"
label var revpol "Policy MID" 
label var revoth "Other Issue MID" 

label var interregnadem "New Democracy"
label var personal1 "Personalist"
label var single1 "Single-Party"
label var military1 "Military"
label var hybrid1 "Hybrid"
label var dynastic1 "Dynastic Monarchy"
label var nondynastic1 "Non-Dynastic Monarchy"
label var interregna "Non-Democratic Interregna"
label var polity2_1 "Democracy Score"

* Make figures

coefplot ///
	(matrix(m1_weeks[.,1]), se(m1_weeks[.,2]) m(smcircle) mlw(medium) msize(medlarge) mfcolor("253 174 97*.4") mlc("253 174 97")  ciop(lcolor("253 174 97" "253 174 97") lwidth(medthick thick) ) label(MID 3)) ///
	(matrix(m1_gml[.,1]), se(m1_gml[.,2])  m(smcircle) mlw(medium) msize(medlarge) mfcolor("215 25 28*.4")  mlc("215 25 28") ciop(lcolor("215 25 28" "215 25 28") lwidth(medthick thick) ) label(GML Data)) ///
	(matrix(m1_mid4[.,1]), se(m1_mid4[.,2])  m(smcircle) mlw(medium) msize(medlarge) mfcolor("31 120 180*.4")  mlc("31 120 180") ciop(lcolor("31 120 180" "31 120 180") lwidth(medthick thick) ) label(MID 4.3)) ///
	,  scheme(s1mono)  ///
	coeflabels()   ///
	legend(col(3) ring()  region(lcolor(none)) size(2)) ///
	xtitle("Coefficient Value" , size(small)) ///
	ytitle(" ", size(small) margin(b=0 l=0 t=0 r=0) ) ///
	subtitle("Nondemocracies are base category" , size(small)) ///
	title("Model 1" , size(medsmall)) ///
	ysca(noline titlegap(0)) ///
	xsca( noextend titlegap(3) range(-2.5,2.5)) ///
	xlabel(-2 -1 0 1 2 , labsize(small) angle(0)  ) ///
	ylabel(,notick   labsize(vsmall)  ) ///
	plotregion(color(gs15) style(none)) ///
	xline(0, lcolor(gray) lpattern(dash)) ///
	ysize(10) xsize() fysize() ///
		graphregion(margin(l=0 r=-2)) ///
	levels(95 90) saving(m1, replace)
	
coefplot ///
	(matrix(m2_weeks[.,1]), se(m2_weeks[.,2]) m(smcircle) mlw(medium) msize(medlarge) mfcolor("253 174 97*.4") mlc("253 174 97")  ciop(lcolor("253 174 97" "253 174 97") lwidth(medthick thick) ) label(MID 3)) ///
	(matrix(m2_gml[.,1]), se(m2_gml[.,2])  m(smcircle) mlw(medium) msize(medlarge) mfcolor("215 25 28*.4")  mlc("215 25 28") ciop(lcolor("215 25 28" "215 25 28") lwidth(medthick thick) ) label(GML Data)) ///
	(matrix(m2_mid4[.,1]), se(m2_mid4[.,2])  m(smcircle) mlw(medium) msize(medlarge) mfcolor("31 120 180*.4")  mlc("31 120 180") ciop(lcolor("31 120 180" "31 120 180") lwidth(medthick thick) ) label(MID 4.3)) ///
	,  scheme(s1mono)  ///
	coeflabels()   ///
	legend(col(3) ring()  region(lcolor(none)) size(2)) ///
	xtitle("Coefficient Value" , size(small)) ///
	ytitle(" ", size(small) margin(b=0 l=0 t=0 r=0) ) ///
	subtitle("Democracies are base category" , size(small)) ///
	title("Model 2" , size(medsmall)) ///
	ysca(noline titlegap(0)) ///
	xsca( noextend titlegap(3) range(-2.5,2.5)) ///
	xlabel(-2 -1 0 1 2 , labsize(small) angle(0)  ) ///
	ylabel(,notick   labsize(vsmall)  ) ///
	plotregion(color(gs15) style(none)) ///
	xline(0, lcolor(gray) lpattern(dash)) ///
	ysize(10) xsize() fysize() ///
		graphregion(margin(l=0 r=-2)) ///
	levels(95 90) saving(m2, replace)
	
coefplot ///
	(matrix(m3_weeks[.,1]), se(m3_weeks[.,2]) m(smcircle) mlw(medium) msize(medlarge) mfcolor("253 174 97*.4") mlc("253 174 97")  ciop(lcolor("253 174 97" "253 174 97") lwidth(medthick thick) ) label(MID 3)) ///
	(matrix(m3_gml[.,1]), se(m3_gml[.,2])  m(smcircle) mlw(medium) msize(medlarge) mfcolor("215 25 28*.4")  mlc("215 25 28") ciop(lcolor("215 25 28" "215 25 28") lwidth(medthick thick) ) label(GML Data)) ///
	(matrix(m3_mid4[.,1]), se(m3_mid4[.,2])  m(smcircle) mlw(medium) msize(medlarge) mfcolor("31 120 180*.4")  mlc("31 120 180") ciop(lcolor("31 120 180" "31 120 180") lwidth(medthick thick) ) label(MID 4.3)) ///
	,  scheme(s1mono)  ///
	coeflabels()   ///
	legend(col(3) ring()  region(lcolor(none)) size(2)) ///
	xtitle("Coefficient Value" , size(small)) ///
	ytitle(" ", size(small) margin(b=0 l=0 t=0 r=0) ) ///
	subtitle("Bilateral disputes only" , size(small)) ///
	title("Model 3" , size(medsmall)) ///
	ysca(noline titlegap(0)) ///
	xsca( noextend titlegap(3) range(-2.5,2.5)) ///
	xlabel(-2 -1 0 1 2 , labsize(small) angle(0)  ) ///
	ylabel(,notick   labsize(vsmall)  ) ///
	plotregion(color(gs15) style(none)) ///
	xline(0, lcolor(gray) lpattern(dash)) ///
	ysize(10) xsize() fysize() ///
		graphregion(margin(l=0 r=-2)) ///
	levels(95 90) saving(m3, replace)
	
coefplot ///
	(matrix(m4_weeks[.,1]), se(m4_weeks[.,2]) m(smcircle) mlw(medium) msize(medlarge) mfcolor("253 174 97*.4") mlc("253 174 97")  ciop(lcolor("253 174 97" "253 174 97") lwidth(medthick thick) ) label(MID 3)) ///
	(matrix(m4_gml[.,1]), se(m4_gml[.,2])  m(smcircle) mlw(medium) msize(medlarge) mfcolor("215 25 28*.4")  mlc("215 25 28") ciop(lcolor("215 25 28" "215 25 28") lwidth(medthick thick) ) label(GML Data)) ///
	(matrix(m4_mid4[.,1]), se(m4_mid4[.,2])  m(smcircle) mlw(medium) msize(medlarge) mfcolor("31 120 180*.4")  mlc("31 120 180") ciop(lcolor("31 120 180" "31 120 180") lwidth(medthick thick) ) label(MID 4.3)) ///
	,  scheme(s1mono)  ///
	coeflabels()   ///
	legend(col(3) ring()  region(lcolor(none)) size(2)) ///
	xtitle("Coefficient Value" , size(small)) ///
	ytitle(" ", size(small) margin(b=0 l=0 t=0 r=0) ) ///
	subtitle("Nondemocracies only;" "personalist base category" , size(small)) ///
	title("Model 4" , size(medsmall)) ///
	ysca(noline titlegap(0)) ///
	xsca( noextend titlegap(3) range(-2.5,2.5)) ///
	xlabel(-2 -1 0 1 2 , labsize(small) angle(0)  ) ///
	ylabel(,notick   labsize(vsmall)  ) ///
	plotregion(color(gs15) style(none)) ///
	xline(0, lcolor(gray) lpattern(dash)) ///
	ysize(10) xsize() fysize() ///
		graphregion(margin(l=0 r=-2)) ///
	levels(95 90)  saving(m4, replace)
	
grc1leg m1.gph m2.gph, rows(1)  scheme(s1mono) 
grc1leg m3.gph m4.gph, rows(1)  scheme(s1mono) 

